package com.java.demo.controller;

import com.java.demo.model.User;
import com.java.demo.model.Users;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: zh
 * Date: 2023-07-29
 * Time: 10:22
 */
@Controller
public class UserController2 {
    @Autowired
    private User user;
    public void sayHi(){
    User user2=user;
        System.out.println("User"+user2);
    user2.setName("王一博");

        System.out.println("User"+user2);
    }

}
